package ltd.newbee.mall.api.admin.vo;

import com.alibaba.excel.annotation.ExcelIgnore;
import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.annotation.format.DateTimeFormat;
import com.alibaba.excel.annotation.format.NumberFormat;
import com.alibaba.excel.annotation.write.style.ColumnWidth;
import com.alibaba.excel.annotation.write.style.ContentRowHeight;
import com.alibaba.excel.annotation.write.style.HeadRowHeight;
import lombok.Data;

import java.math.BigDecimal;
import java.util.Date;

/**
 * 订单导出VO
 */
@Data
@HeadRowHeight(20)
@ContentRowHeight(15)
public class OrderExportVO {

    @ExcelProperty(value = "订单ID")
    @ColumnWidth(15)
    private Long orderId;

    @ExcelProperty(value = "订单号")
    @ColumnWidth(20)
    private String orderNo;

    @ExcelProperty(value = "支付订单号")
    @ColumnWidth(20)
    private String payNo;

    @ExcelProperty(value = "退款订单号")
    @ColumnWidth(20)
    private String refundNo;

    @ExcelProperty(value = "开票状态")
    @ColumnWidth(12)
    private String isBillText; // 修改为文本字段

    @ExcelProperty(value = "退款状态")
    @ColumnWidth(12)
    private String refundStatusText;

    @ExcelProperty(value = "退款原因")
    @ColumnWidth(20)
    private String refundReason;

    @ExcelProperty(value = "物流单号")
    @ColumnWidth(20)
    private String trackingNo;

    @ExcelProperty(value = "寄件人手机尾号")
    @ColumnWidth(15)
    private String sendPhone;

    @ExcelProperty(value = "发票URL")
    @ColumnWidth(25)
    private String billUrl;

    @ExcelProperty(value = "发票号码")
    @ColumnWidth(15)
    private String billNo;

    @ExcelProperty(value = "用户ID")
    @ColumnWidth(15)
    private Long userId;

    @ExcelProperty(value = "订单总价")
    @ColumnWidth(15)
    private BigDecimal totalPrice;

    @ExcelIgnore
    private String payStatusText; // 修改为文本字段

    @ExcelIgnore
    private String payTypeText; // 修改为文本字段

    @ExcelProperty(value = "支付时间")
    @ColumnWidth(20)
    @DateTimeFormat("yyyy-MM-dd HH:mm:ss")
    private Date payTime;

    @ExcelProperty(value = "订单状态")
    @ColumnWidth(12)
    private String orderStatusText; // 修改为文本字段

    @ExcelIgnore
    private String extraInfo;

    @ExcelProperty(value = "创建时间")
    @ColumnWidth(20)
    @DateTimeFormat("yyyy-MM-dd HH:mm:ss")
    private Date createTime;

    @ExcelProperty(value = "更新时间")
    @ColumnWidth(20)
    @DateTimeFormat("yyyy-MM-dd HH:mm:ss")
    private Date updateTime;

    // 数字字段（用于条件判断和转换）
    @ExcelIgnore
    private Integer orderStatus;
    @ExcelIgnore
    private Integer payType;
    @ExcelIgnore
    private Integer isBill;
    @ExcelIgnore
    private String refundStatus;


}
